This turns out to be necessary for transitioning filters,
and we run into criticals if transitioning numbers
unexpectedly returns NULL. I've observed that with
* {
filter: invert(80%);
}
This was broken in
c9e972eecb3a78ea.
guint property_id,
double progress)
{
- if (start->unit != end->unit)
- return NULL;
+ if (start->unit == end->unit)
+ return gtk_css_dimension_value_new (start->value + (end->value - start->value) * progress, start->unit);
- return gtk_css_dimension_value_new (start->value + (end->value - start->value) * progress, start->unit);
+ return gtk_css_number_value_transition (start, end, property_id, progress);
}
static const GtkCssNumberValueClass GTK_CSS_VALUE_DIMENSION = {